﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cmd
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = true)]
    public class OptionGroupAttribute : Attribute
    {
        internal bool? _required;

        public string Name { get; private set; }
        public bool Required
        {
            get { return _required.HasValue ? _required.Value : false; }
            set { _required = value; }
        }

        public OptionGroupAttribute(string groupName)//, bool? required = null)
        {
            Name = groupName;
            //Required = required;
        }

        public override string ToString()
        {
            return string.Format("{0}, Required = {1}", Name, Required);
        }
    }
}
